package cn.niit.service.impl;

import cn.niit.dao.UserDao;
import cn.niit.service.UserService;

/**
 * @title: UserServiceImpl
 * @Author Zhj
 * @Date: 2021/10/9 10:39
 * @Version 1.0
 */
public class UserServiceImpl<UserDaoMysql,UserDaoOracle> implements UserService {
    //private UserDao userDao = new UserDaoImpl();
    /*  添加用户*/
    private UserDao userDao;
    public int addUser(){
        System.out.println("[UserServiceImpl]处理业务逻辑");
        return userDao.insert();
    }
        /*我们需要一个真实用户来完成增删改查这些操作*/
    public  void add(){
        System.out.println("[UserServiceImpl]增加了一个用户");
    }
    public void delete(){
        System.out.println("[UserServiceImpl]删除了一个用户");
    }
    public void update(){
        System.out.println("[UserServiceImpl]更新了一个用户");
    }
    public void query(){
        System.out.println("[UserServiceImpl]查询了一个用户");
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }
}
